home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 38
/
Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso
/
-seriously_amiga-
/
misc
/
ced_html
/
html
/
html_table_caption.ced
< prev
next >
Wrap
Text File
|
1999-01-25
|
3KB
|
99 lines
/*
** html_table_caption.ced
**
** $VER: html_table_caption.ced 1.1 (12.07.1998)
**
** Arexx script for HTML v3.2 table caption mark
**
** This script works with CygnusEd Professional v4.2
**
** Copyright © Eric BELLE
*/
/*
**------------------------------------------------------------------------------
** Initialisation
**------------------------------------------------------------------------------
*/
OPTIONS RESULTS /* Tell CygnusEd to return results. */
NL = '0A'X /* Alias for new line. */
KRETURN = RAWKEY 68 /* Shortcut to the return key. */
KTAB = RAWKEY 66 /* Shortcut to the tab key. */
STATUS TABSARESPACES /* Return TAB mode ("tab" or "space"). */
IF RESULT = 1 /* Test the TAB mode. */
THEN "TABS = SPACES" /* Switch TAB mode from "space" to "tab". */
ELSE NOP /* No operation. */
TAB SIZE 1 /* Set TAB size proportional to 2 spaces. */
/*
**------------------------------------------------------------------------------
** Table caption
**------------------------------------------------------------------------------
*/
CaptionMode = "q"
DO WHILE ~(CaptionMode="t" | CaptionMode="b",
| CaptionMode=" " | CaptionMode="RESULT")
GETSTRING "t" '"Caption type: (t)op, (b)ottom?"'
CaptionMode = RESULT
END
IF (CaptionMode="RESULT" | CaptionMode=" ")
THEN EXIT 0
ELSE NOP
CaptionPositionMode = "q"
DO WHILE ~(CaptionPositionMode="l" | CaptionPositionMode="c",
| CaptionPositionMode="r",
| CaptionPositionMode=" " | CaptionPositionMode="RESULT")
GETSTRING "c" '"Caption position: (l)eft, (c)enter, (r)ight?"'
CaptionPositionMode = RESULT
END
IF (CaptionPositionMode="RESULT" | CaptionPositionMode=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Html table caption structure
**------------------------------------------------------------------------------
*/
SELECT
WHEN (CaptionMode="t") THEN CaptionModeString = " VALIGN=TOP"
WHEN (CaptionMode="b") THEN CaptionModeString = " VALIGN=BOTTOM"
OTHERWISE NOP
END
SELECT
WHEN (CaptionPositionMode="c") THEN CaptionPositionModeString = " ALIGN=CENTER"
WHEN (CaptionPositionMode="l") THEN CaptionPositionModeString = " ALIGN=LEFT"
WHEN (CaptionPositionMode="r") THEN CaptionPositionModeString = " ALIGN=RIGHT"
OTHERWISE NOP
END
OpenCaption = "<CAPTION" || CaptionModeString || CaptionPositionModeString || ">"
CloseCaption = "</CAPTION>"
/*
**------------------------------------------------------------------------------
** Html table structure
**------------------------------------------------------------------------------
*/
TEXT OpenCaption
"AUTO-INDENT" ; KTAB
TEXT "Should be modified - Table caption"
"AUTO-INDENT" ; BACKTAB
TEXT CloseCaption
/*
**------------------------------------------------------------------------------
** End of html_table_caption.ced Arexx script
**------------------------------------------------------------------------------
*/
EXIT 0